package com.library.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户浏览资源日志表
 * </p>
 *
 * @author ccl
 * @since 2025-03-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="UserLoginBrowsingLog对象", description="用户登录日志表")
public class UserLoginBrowsingLog extends Model<UserLoginBrowsingLog> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private String openId;

    @ApiModelProperty(value = "省")
    private String province;

    @ApiModelProperty(value = "市")
    private String city;

    @ApiModelProperty(value = "区")
    private String area;
    @ApiModelProperty(value = "街道")
    private String street;
    @ApiModelProperty(value = "村")
    private String committee;
    @ApiModelProperty(value = "会话ID")
    private String sessionId;

    @ApiModelProperty(value = "浏览的页面URL")
    private String pageUrl;

    @ApiModelProperty(value = "来源页面URL")
    private String referrerUrl;

    @ApiModelProperty(value = "用户IP地址")
    private String ipAddress;

    @ApiModelProperty(value = "用户代理（浏览器信息）")
    private String userAgent;

    @ApiModelProperty(value = "记录创建时间")
    private Date createdAt;

    @ApiModelProperty(value = "记录更新时间")
    private Date updatedAt;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
